/**
 * @author Eliana - Matias
 */


function displayData(){
	checkCookie();

    var xml = loadXMLDoc2("xml/propiedadesXML.xml");
    
    var xsl = loadXMLDoc2("xml/propiedadesXSL.xml");
    //alert(xsl);

	
    // code for IE
    if (window.ActiveXObject) {
        ex = xml.transformNode(xsl);
        document.getElementById("destacados").innerHTML = ex;
    }
    // code for Mozilla, Firefox, Opera, etc.
    else 
        if (document.implementation && document.implementation.createDocument) {
        	
            xsltProcessor = new XSLTProcessor();
            //alert("1");
            //try{
            xsltProcessor.importStylesheet(xsl);
            //}catch(e){
            	//alert(e.message);
            //}
            //alert("2");
            resultDocument = xsltProcessor.transformToFragment(xml, document);
            //alert("3");
			exampleDiv = document.getElementById("destacados");
			//alert("4");
			exampleDiv.innerHTML = "";
			//alert("5");
            exampleDiv.appendChild(resultDocument);
            //alert("6");
        }
        
}



function loadXMLDoc2(dname){
    if (window.XMLHttpRequest) {
        xhttp = new XMLHttpRequest();
    }
    else {
        xhttp = new ActiveXObject("Microsoft.XMLHTTP");
    }
    xhttp.open("GET", dname, false);
    xhttp.send("");
    return xhttp.responseXML;
}